<%@ page import="org.xilin.Family" %>

<g:setProvider library="jquery"/>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <g:set var="entityName" value="${message(code: 'family.label', default: 'Family')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
    </head>
    <body>
<g:applyLayout name="container">
        <div class="tabContent" style="position:relative">
        <div class="body">
            <h1><g:message code="default.list.label" args="[entityName]" />Family Info</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                        
                            <g:sortableColumn property="userId" title="${message(code: 'family.userId.label', default: 'Id')}" />
                        
                            <g:sortableColumn property="fatherFirstName" title="${message(code: 'family.fatherFirstName.label', default: 'Father First Name')}" />
                        
                            <g:sortableColumn property="fatherLastName" title="${message(code: 'family.fatherLastName.label', default: 'Father Last Name')}" />
                        
                            <g:sortableColumn property="motherFirstName" title="${message(code: 'family.motherFirstName.label', default: 'Mother First Name')}" />
                        
                            <g:sortableColumn property="motherLastName" title="${message(code: 'family.motherLastName.label', default: 'Mother Last Name')}" />
                        
                            <g:sortableColumn property="address" title="${message(code: 'family.address.label', default: 'Address')}" />
                        
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${familyInstanceList}" status="i" var="familyInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                        
                            <td><g:link action="show" id="${familyInstance.id}">${fieldValue(bean: familyInstance, field: "userId")}</g:link></td>
                        
                            <td>${fieldValue(bean: familyInstance, field: "fatherFirstName")}</td>
                        
                            <td>${fieldValue(bean: familyInstance, field: "fatherLastName")}</td>
                        
                            <td>${fieldValue(bean: familyInstance, field: "motherFirstName")}</td>
                        
                            <td>${fieldValue(bean: familyInstance, field: "motherLastName")}</td>
                        
                            <td>${fieldValue(bean: familyInstance, field: "address")}</td>
                        
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${familyInstanceTotal}" />
            </div>
        </div>
        </div>
</g:applyLayout>
    </body>
</html>
